package com.malamute.core.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;

/**
 * @author Aceguan
 * @description TODO
 * @date 2012-2-20 下午08:05:51
 * @version v1.0
 */
public class MyFilterInterceptor extends MethodFilterInterceptor {
	// 输出
	private String name;

	/**
	 * 获取name
	 * 
	 * @return name
	 */

	public String getName() {
		return name;
	}

	/**
	 * 设置name
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @param invocation
	 * 
	 * @return
	 * 
	 * @throws Exception
	 * 
	 * @see
	 * com.opensymphony.xwork2.interceptor.MethodFilterInterceptor#doIntercept
	 * (com.opensymphony.xwork2.ActionInvocation)
	 */
	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		for(String method:this.getIncludeMethodsSet()){
			System.out.println("doIntercept____"+method);;
		}
		System.out.println(name);
		return invocation.invoke();
	}

}
